package com.example.spark.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.spark.entity.Affair;
import com.example.spark.entity.dto.PaginationDTO;

import com.example.spark.entity.result.CommonResult;
import org.springframework.web.multipart.MultipartFile;

public interface AffairService extends IService<Affair> {
    /**
     * 获取业务
     */
    CommonResult<IPage<Affair>> getAll(PaginationDTO<Affair> pageDto);

    /**
     * 添加业务
     */

    CommonResult<Affair> saveOne(Affair affair);

    /**
     * 删除业务
     */
    CommonResult<Long> deleteById(Long id);

    /**
     * 修改业务
     */

    CommonResult<Affair> updateOne(Affair affair);

    /**
     * 修改业务
     */

    CommonResult<String> updatePhoto(MultipartFile photo, Long id);
}
